package com.vans.practice.executors;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @Description: 分析ixedThreadPool线程池的弊端
 * @Note:
 * @Author elle
 * @Date 2020/10/5 9:57
 */
public class FixedThreadPoolAlaTEst {

    private final static ExecutorService executorService = Executors.newFixedThreadPool(3);

    public static void main(String[] args) {
        for (int i = 0; i < Integer.MAX_VALUE; i++) {
            int finalI = i;
            executorService.execute(() ->
                    System.out.println("qxy is running! " + finalI));
        }
    }

}
